# -*- codeing = utf-8 -*-
# @Time : 2021/2/2 19:48
# @Atuthor: 朱朱
# @File: converters.py
# @Software: PyCharm
from django.urls import converters

class UsernameConverter:
    # regex = '[a-zA-Z0-9_-]{5,20}]'
    regex = '[a-zA-Z0-9_-]{5,20}'  # 有时假正则写对了,也会出404错误,可以再写一次正则.怪怪怪
    def to_python(self,value):
        return value